//
//  BZThemeModel.h
//  MZBasic
//
//  Created by Sings on 2022/8/10.
//

#import <Foundation/Foundation.h>

typedef enum : NSUInteger {
    BZThemeModelType_Color = 0,
    BZThemeModelType_CGColor,
    BZThemeModelType_Image,
    BZThemeModelType_Block,
    BZThemeModelType_Sel
} BZThemeModelType;

NS_ASSUME_NONNULL_BEGIN

@interface BZThemeModel : NSObject 

@property (nonatomic, weak, readonly) id target;

@property (nonatomic, copy, readonly) NSString *key;

@property (nonatomic, copy, readonly) NSString *keyPath;

@property (nonatomic, assign, readonly) BZThemeModelType type;

@property (nonatomic, copy, readonly) BZThemeBindBlock themeBlock;

- (instancetype) initColorWithTarget:(id) target KeyPath:(NSString *) keyPath ColorKey:(NSString *) key;
- (instancetype) initColorWithTarget:(id) target KeyPath:(NSString *) keyPath ColorPath:(NSString *) colorPath;
- (instancetype) initCGColorWithTarget:(id) target KeyPath:(NSString *) keyPath ColorKey:(NSString *) key;
- (instancetype) initCGColorWithTarget:(id) target KeyPath:(NSString *) keyPath ColorPath:(NSString *) colorPath;
- (instancetype) initBlockWithTarget:(id) target Block:(BZThemeBindBlock) block;
- (instancetype) initSelWithTarget:(id) target Sel:(SEL) sel;
- (instancetype) initImageWithTarget:(id) target KeyPath:(NSString *) keyPath ImageKey:(NSString *) key;

- (void) refresh;

@end

NS_ASSUME_NONNULL_END
